home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Blitz2 / BlitzFaq / FaqLists / Busywindow.txt < prev    next >
Encoding:
Text File  |  1996-09-05  |  764 b   |  21 lines

  1. Statement BusyWindow {busy$}
  2. SHARED WinFSize,RScreenH,RScreenW,yfactor,pattern
  3. Menus Off                               ; Just turns off the menus!
  4. x1=RScreenW/2-(RScreenW/4)-20:x2=(RScreenW/2)+20
  5. y1=RScreenH/2-(RScreenH/5/yfactor):y2=WinFSize*4
  6. Window 0,x1,y1,x2,y2,0,"",0,1
  7. If pattern=1 Then putpattern {0,0,1}:WJam 0   ; use WJam 0 if a window pattern
  8. rast.l=RastPort(0)                            ; is used!
  9. ; Find the WIDTH of the text
  10. WindowFont 1                                  ; use the right font.
  11. l=Len(busy$)
  12. t=TextLength_(rast(0),busy$,l)
  13. WColour 1,0
  14. d=(InnerWidth/2)
  15. d=d-t/2
  16. WLocate d,(InnerHeight/2)-WinFSize/2
  17. Print busy$
  18. WindowToFront_ (Peek.l(Addr Window(0)))
  19. WJam 1                                        ; return WJam to default.
  20. End Statement
  21.